package com.fan.admin.service.impl;

import com.fan.admin.dao.TeacherMapper;
import com.fan.admin.service.TeacherService;
import com.fan.commons.pojo.Course;
import com.fan.commons.pojo.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fan
 * @date 2021/2/12
 */
@Service
public class TeacherServiceImpl implements TeacherService {

	@Autowired
	private TeacherMapper teacherMapper;

	@Override
	public int insertTeacher(Teacher teacher) {

		return teacherMapper.insertTeacher(teacher);
	}

	@Override
	public List<Teacher> queryTeachers(Teacher teacher) {
		return teacherMapper.queryTeachers(teacher);
	}

	@Override
	public String getTeacherId(String collegeId, String systemId) {
		return teacherMapper.getTeacherId(collegeId, systemId);
	}

	@Override
	public int updateTeacherById(Teacher teacher) {
		return teacherMapper.updateTeacherById(teacher);
	}

	@Override
	public int deleteTeacherById(Integer id) {
		return teacherMapper.deleteTeacherById(id);
	}

	@Override
	public List<Course> teacherCourseCla(String teacherId) {
		return teacherMapper.teacherCourseCla(teacherId);
	}
}
